package com.kjlink.internal.workreport.project.mapper;

import cn.xuqiudong.common.base.mapper.BaseMapper;
import cn.xuqiudong.common.base.vo.Select2VO;
import com.kjlink.internal.report4vue.statictics.response.ApiProjectSummary;
import com.kjlink.internal.workreport.project.model.Project;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 功能: :项目 Mapper
 *
 * @author Vic.xu
 * @since 2024-04-29 13:39
 */
public interface ProjectMapper extends BaseMapper<Project> {

    int addProjectUser(@Param("projectId") Integer projectId, @Param("userIds") Integer[] userIds);

    int deleteProjectUser(@Param("userId") Integer userId, @Param("projectId") Integer projectId);

    List<Select2VO> mineProject(@Param("userId") Integer userId);

    /**
     * 研发经理的项目
     */
    List<Select2VO> devManagerProject(@Param("userId") Integer userId);

    List<Select2VO> mineUsableProject(@Param("userId") Integer userId);

    List<Project> noneClosedProjects();

    ApiProjectSummary summary();
}
